/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI.TaskPane;



import clienteSandraParada.Login;
import com.l2fprod.common.swing.JTaskPaneGroup;

/**
 *
 * @author Equipo de construcción
 */
public class TaskPaneGroupProgramasMedicos extends JTaskPaneGroup 
{
    public TaskPaneGroupProgramasMedicos() 
    {
        this.setTitle("Programas médicos");        
        this.setSpecial(true); // PERMITE ANIMACION
        this.setExpanded(false);// NO EXPANDIDO AL INICIO
        // AGREGANDO MODULOS   
        service.Privilegios p = (service.Privilegios) cargarPrivilegios(Login.getUser().getRut());
        if(p.isVerModuloProgramaMedicoFonasa()){         
            ItemTaskPane moduloPrograma = new ItemTaskPane("FONASA");
            moduloPrograma.setIcon(new javax.swing.ImageIcon(getClass().getResource("/GUI/Img/Iconos35X35/fonasa.jpg")));
            this.add(moduloPrograma);
        }
        if(p.isVerModuloProgramaMedicoDipreca()){                
            ItemTaskPane moduloProgramaDipreca = new ItemTaskPane("DIPRECA");
            moduloProgramaDipreca.setIcon(new javax.swing.ImageIcon(getClass().getResource("/GUI/Img/Iconos35X35/dipreca.png")));
            this.add(moduloProgramaDipreca);
                    
        }
        if(p.isVerModuloProgramaMedicoJeafosale()){              
            ItemTaskPane moduloProgramaJeafosale = new ItemTaskPane("JEAFOSALE");
            moduloProgramaJeafosale.setIcon(new javax.swing.ImageIcon(getClass().getResource("/GUI/Img/Iconos35X35/jeafosale.jpg")));
            this.add(moduloProgramaJeafosale);
        }
        // FIN AGREGANDO MODULOS        
    }
    private static Object cargarPrivilegios(java.lang.String rut) {
        service.PrivilegiosWS_Service service = new service.PrivilegiosWS_Service();
        service.PrivilegiosWS port = service.getPrivilegiosWSPort();
        return port.cargarPrivilegios(rut);
    }    
}
